package ru.bragnikita.utils.swing.message;

import net.engio.mbassy.bus.BusConfiguration;
import net.engio.mbassy.bus.MBassador;

/**
 * @author Nikita.Brazhnikov
 */
public class EventUtils {

	private static MBassador<PanelMessage> panelMessagesBus = new MBassador<>(BusConfiguration.Default());

	public static void publishAcync(PanelMessage message) {
		panelMessagesBus.post(message).now();
	}

	public static void registerOnPanelMessagesBus(Object subscriber) {
		panelMessagesBus.subscribe(subscriber);
	}


}
